package InputStream;import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;import java.io.*;  class Student implements Serializable{    int id;    String name;    int age;    String department;     public Student(int id, String name, int age, String department){        this.id = id;        this.name = name;        this.age = age;        this.department = department;    }}    //面向对象传参，输出一个文件，将文件转化为对象输出流，将参数写入对象流，关闭；public class Objectser {    public static void main(String[] args) {        Student stu = new Student(981036,"Li Ming", 16 , "USD");        try {            FileOutputStream fo = new FileOutputStream("data.ser");            ObjectOutputStream so = new ObjectOutputStream(fo);            so.writeObject(stu);            so.close();        }catch (IOException e){            System.out.println(e);        }    }}